package com.api.objectday02;

import java.math.BigInteger;
import java.util.Arrays;

public class IntegerStringTest {
    public static void main(String[] args) {
        //string 的三个方法 和正则表达式的应用
        String s1 = "zero@qq.com";
        String s2 = "[a-zA-Z0-9_]+@[a-zA-Z0-9]+(\\.[a-zA-Z]+)";
        //匹配格式是否正确
        boolean  b = s1.matches(s2);
        System.out.println(b);

        String s3 = "z1e2r3o";
        //字符串特定范围内的替换
        String s = s3.replaceAll("[0-9]+", "*");
        System.out.println(s);

        String s4 = "*z*e**r***o******";
        //字符串的拆分  开头会被拆分成"" 末尾会被舍去  隔两个也会生成一个""
        String[] ss = s4.split("\\*");
        String s5 = Arrays.toString(ss);
        System.out.println(s5);

        Integer i1 =new Integer("1");
        Integer i = 1;
        boolean bb = i1.equals(i);

        int j = i;


        BigInteger bi = new BigInteger("1");
        BigInteger bi1 = new BigInteger("1");
        int ij = bi.add(bi1).subtract(bi1).multiply(bi1).divide(bi1).pow(bi1.intValue()).add(bi1).min(bi1).intValue();
        System.out.println(ij);


    }
}
